Skip to content

Make the rest() function aware of @p.X and @p['X'] (breaking change)#108

Merged
nblumhardt merged 1 commit into
serilog:devfrom
nblumhardt:dev
Jun 4, 2024
Merged

Make the rest() function aware of @p.X and @p['X'] (breaking change)#108
nblumhardt merged 1 commit into
serilog:devfrom
nblumhardt:dev

Conversation

@nblumhardt

@nblumhardt nblumhardt commented Nov 16, 2023

Copy link
Copy Markdown
Member

Fixes #107

The existing behavior was intended to allow @p.X to be an escape hatch so that the reference to X is invisible to rest(). This turns out to be confusing in actual use.

The new ways to hide a property reference from rest() are:

let p = @p in p.X

or

@p[concat('X', '')]

etc.

Major version bump because this is likely to affect a few templates in use.

@nblumhardt nblumhardt merged commit b42533b into serilog:dev Jun 4, 2024
@nblumhardt nblumhardt mentioned this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use #delimit within an #if block inside a #each loop

1 participant